﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using Stamp_For_Africa_Version_2.Repositories;

namespace Stamp_For_Africa_Version_2.Helpers
{
  public static class ListHelpers
  {
    public static SelectList Countries
    {
      get
      {
        CountryRepository countryRepository = new CountryRepository();
        return new SelectList(countryRepository.FindAllCountries().OrderBy(u => u.Name), "Id", "Name", null);
      }
    }

    public static SelectList Watermarks
    {
      get
      {
        WatermarkRepository watermarkRepository = new WatermarkRepository();
        SelectList selectList = new SelectList(watermarkRepository.FindAllWatermarks(), "Id", "DisplayName", null);
        
        return new SelectList(watermarkRepository.FindAllWatermarks(), "Id", "DisplayName", null);
      }
    }

		public static SelectList Categories
		{
			get
			{
				CategoryRepository repository = new CategoryRepository();
				return new SelectList(repository.FindAllCategories().OrderBy(u => u.DisplayName), "Id", "DisplayName", null);
			}
		}

		public static SelectList Artists
		{
			get
			{
				ArtistRepository repository = new ArtistRepository();
				return new SelectList(repository.FindAllArtists().OrderBy(u => u.Name), "Id", "DisplayName", null);
			}
		}

		public static SelectList Series
		{
			get
			{
				SeriesRepository repository = new SeriesRepository();
				return new SelectList(repository.FindAllSeries(), "Id", "Name", null);
			}
		}

		public static SelectList Catalogues
		{
			get
			{
				CatalogueRepository repository = new CatalogueRepository();
				return new SelectList(repository.FindAllCatalogues(), "Id", "CatalogName", null);
			}
		}

		public static SelectList IssueTypes
		{
			get
			{
				TypeRepository repository = new TypeRepository();
				return new SelectList(repository.FindAllTypes(), "Id", "DisplayName", null);
			}
		}

  }
}